home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000076_icon-group-sender_Tue Jun 19 07:44:54 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f5JEido06712
  4.     for icon-group-addresses; Tue, 19 Jun 2001 07:44:39 -0700 (MST)
  5. Message-Id: <200106191444.f5JEido06712@baskerville.CS.Arizona.EDU>
  6. From: Chris.D.Tenaglia@jci.com
  7. Subject: Re: code needed!
  8. To: deborah_fairwater@hotmail.com
  9. Cc: icon-group@cs.arizona.edu
  10. Date: Tue, 19 Jun 2001 09:10:02 -0500
  11. X-MIMETrack: Serialize by Router on jwimkrs1.na.jci.com/NA/Johnson_Controls(Release 5.0.6a
  12.  |January 17, 2001) at 06/19/2001 09:27:18 AM
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: RO
  15. Content-Length: 1556
  16.  
  17.  
  18. #
  19. # file : padsent.icn
  20. # desc : add extra space to end of each sentence
  21. # use : padsent <infile >outfile
  22. #
  23. procedure main()
  24.  
  25.     while line := read() do
  26.         {
  27.         work := reverse(line)
  28.         text   := ""
  29.         every i := 1 to *work do
  30.      {
  31.                 text ||:= work[i]
  32.      if (work[i] == " ") & (work[i+1] == ".") then text ||:= " "
  33.                 if (work[i] == " ") & (work[i+1] == "?") then text ||:= " "
  34.                 if (work[i] == " ") & (work[i+1] == "!") then text ||:= " "
  35.      }
  36.         write(reverse(text))
  37.         }
  38.   end
  39.  
  40.  
  41.  
  42.  
  43.                                                                                                                      
  44.                     deborah_fairwater@h                                                                              
  45.                     otmail.com                 To:     icon-group@CS.Arizona.EDU                                     
  46.                                                cc:                                                                   
  47.                     06/16/01 03:53 PM          Subject:     code needed!                                             
  48.                                                                                                                      
  49.                                                                                                                      
  50.  
  51.  
  52.  
  53.  
  54. Help - I need the icon code that will look at an input text file and
  55. replace single spaces between sentences with double spaces - can anyone
  56. help?
  57.  
  58. Thank you.
  59.  
  60.  
  61.  
  62.  
  63.